package com.enjoyor.soa.traffic.util.bean.error;

import com.enjoyor.soa.traffic.util.bean.base.BaseResult;

public class RestError extends BaseResult {

    private static final long serialVersionUID = 5264391844817546234L;

    private static final String EResponse = "发生异常";

    private DError error;

    public RestError() {
    }

    public RestError(BaseResult.Status status, Object response) {
        super(status, response);
    }

    public RestError(DError error) {
        this.error = error;
        super.setResponse(EResponse);
        super.setStatus(BaseResult.Status.ERROR);
    }

    public DError getError() {
        return this.error;
    }

    public void setError(DError error) {
        this.error = error;
    }
}
